package com.first.hms.service;

import com.first.hms.entity.User;
import com.first.hms.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * 方法：
 * registerUser(User user)：用户注册
 * deleteUser(User user):注销用户、删除用户
 * selecteUser(User user)：用户登录、查询用户信息
 * update User(User user)：修改用户信息*/
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public int registerUser(User user) {
        return userMapper.registerUser(user);
    }
    public int deleteUser(User user) {
        return userMapper.deleteUser(user);
    }
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }
    public User selectUser(User user) {
        return userMapper.selectUser(user);
    }


}
